package cn.wolfcode.mapper;

import cn.wolfcode.domain.Employee;
import cn.wolfcode.domain.Permission;
import cn.wolfcode.qo.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee record);

    int selectForCount(QueryObject qo);

    List<Employee> selectForList(QueryObject qo);

    void insertByRid (@Param("eid") Long eid, @Param("rid") Long rid);

    void deleteByEid(Long id);
    //查是否有这用户
    Employee login(@Param("username") String username, @Param("password") String password);
    //根据员工id查询对应的权限
    List<String> selectByEidPermission(@Param("eid") Long id);
    //查询用户名是否已经存在
    Employee selectByUername(String username);

    void updatePassword(Long id);
}